Linking Documents

DEACOM has the ability to read a directory containing PDF or image files, find barcodes on these images, and attach each of these files to the correct Sales Order, Purchase Order, or Job. The list of file types that are available for use with the Link Documents function is listed below. It is recommended to use PDF and/or PNG files when possible.

  • .PDF (recommended to save space on the SQL server machine)
  • .PNG
  • .TIF
  • .TIFF
  • .GIF
  • .JPG
  • .JPEG (recommended to save space on the SQL server machine)
  • .BMP (not recommended due to amount of disk space required on the server)
  • .DCX

Configuration

System files

A number of library files are required to be installed on each computer in order to link documents. The DEACOM update places these files in the “Controls” folder of the main DEACOM installation folder. Perform the following to ensure users may utilize the Link Documents functionality:

  1. Open the following three folders on the computer in separate File Explorer windows:
    1. C:\Windows\System32.
    2. C:\Windows\SysWOW64.
    3. Main DEACOM installation folder > "Controls" folder.
  2. In the "Controls" folder:
    1. Open the EZTwain_System32 folder, copy all files, and add them to the Windows System32 folder.
    2. Open the EZTwain_SysWOW64 folder, copy all files, and add them to the Windows SysWOW64 folder.
    3. Locate and copy all the files that start with "bi", "ez", and "license" and add them to both C:\Windows\System32 and C:\Windows\SysWOW64.
  3. In the main DEACOM installation folder, locate and copy all files that begin with "ikvm" and add them to both C:\Windows\System32 and C:\Windows\SysWOW64.

Additionally, all DEACOM versions will require the following to use the Link Documents functionality:

  • A program such as the 32-bit and 64-bit Ghostscript program (http://www.ghostscript.com/download/gsdnld.html) for reading PDFs and either vcredist_2008_32.exe or vcredist_2008_64.exe (both 32 bit and 64 bit version are included with DEACOM) for reading all image formats. These programs will need to be installed on any computer that will be using or running the Link Documents function in DEACOM. Note that the 32-bit and 64-bit version of Ghostscript must be installed. The link in the first sentence contains the downloads for the 32 and 64 bit Windows versions.
  • vcredist_2008_32.exe (included with DEACOM).
  • vcredist_2008_64.exe (included with DEACOM).

The "Controls" folder contains two files/folders for both versions of EZTwain, one for the DEACOM classic versions and one for DEACOM web versions. The folders are labeled accordingly. Specifically, the EZTwain_System32 and EZTwain_SysWOW64 with dll's that will be placed into their respective windows folders to allow Link Documents to work for both Classic and Web.

Barcode setup for DEACOM classic versions

For documents printed out of the DEACOM system, a barcode needs to be present on the document so that it will be linked to the correct record. There are a few requirements for this barcode, including:

  • The barcode must start and end with an asterisk. This is the code that tells the barcode reader to start and end the barcode.
  • Between the asterisks, a prefix of "SO-" ,"PO-", or "JOB-" is required to tell the document linker what kind of record to link to: Sales Order, Purchase Order, or Job, respectively.
    • Note that these are capital letters. Lower case letters cannot be represented in 3 of 9 barcodes.
    • While "SO-" and "PO-" are always required, "JOB-" should only be used in versions 15.02.031 and higher. Link Documents for Jobs is not supported on versions below 15.02.
    • When utilizing WMS and the Link Documents function, the WMS application will automatically parse out the "PO-" , "SO-", or "JOB-" prefixes when scanning a 3 of 9 barcode.
  • After the prefix, enter the Sales Order, Purchase Order, or Job number without any dashes.
  • The font for the barcode needs to be BarCode 3 of 9, which should already be available in the DEACOM directory. If it is not, please contact DEACOM Support.
  • The font size should be 22 points or larger and not printed in bold.

All of the above requirements mean that the string to print on a Sales Order document would be "*SO-" + ALLT(STR(m.to_ordnum,11)) + "*" and the string to print on a Purchase Order document would be "*PO-" + ALLT(STR(m.tp_purnum,11)) + "*". Each is located on a separate line to create the ability to copy and paste the corresponding user reports into the document.

Note: Documents not originally printed from DEACOM, such as pictures or shipping documents provided by vendors, must have a label attached to them which indicates the Sales Order, Purchase Order, or Job to which the document should be attached. These labels can be sales labels, purchasing labels, sales reports, purchasing reports, or production orders. The labels can have information on them that is human-readable in addition to the barcodes described above. Use standard user report formatting to set the label size, place, and format of the fields on the labels. If the labels will be printed on a dedicated label printer, the printer environment can be fixed.

Barcode setup for DEACOM web versions

For documents printed out of the DEACOM system, a barcode needs to be present on the document so that it will be linked to the correct record. The following barcode examples may be used to link the following documents in web versions of DEACOM. Similar to the setup for classic versions, a prefix of "SO-", "PO-", or "JOB-" is required. (While "SO-" and "PO-" are always required, "JOB-" should only be used in versions 15.02.031 and higher. Link Documents for Jobs is not supported on versions below 15.02.) Once the barcodes below have been created, users should highlight the barcode and select a font size of 22 or higher. Do not use bold. When utilizing WMS and the Link Documents function, the WMS application will automatically parse out the "PO-" , "SO-", or "JOB-" prefixes when scanning a 3 of 9 barcode.

  • Sales Order: “SO-“ + ALLT(TRANS(m.to_ordnum,”99999999999”))
  • Purchase Order: “PO-“ + ALLT(TRANS(m.tp_purnum,”99999999999”))
  • Job: “JOB-“ + ALLT(TRANS(m.jo_jobnum,”999999999”))

Process

There are two steps necessary to link documents to orders: Scanning and Linking.

Scanning documents

  1. Using a scanner, scan in the documents with the correct barcode on them indicating what record they should be attached to.
  2. Put the files into a directory that is accessible to the computer that will be linking them. The names of the files do not matter because the scanner can automatically increment a file name. Save the labels as either PDF or JPG files in order to save space on the SQL server machine. Do not save the labels as BMP files as these are uncompressed and will take up too much disk space on the server.

Linking documents

  1. Navigate to Tools > Link Documents. If an error indicating the “libraries aren’t loaded” is displayed, this means that this particular computer has not been set up to link documents. Complete the steps listed in "System files" section of the Configuration section above to resolve this error.
  2. A Windows Explorer form, titled “Select Document Folder”, is displayed.
  3. Navigate to the directory where the scanned documents were stored and click OK. A mover form with all files found in the directory is displayed.
  4. A list of all files found will be in the left hand window and a list of files to link, which is initially empty, is found in the right hand window. Move the files that should be linked to the right hand window by double-clicking or using the "Move" button. If all files need to be linked, use the "Move All" button.
  5. Once all desired files have been moved to the right hand window, click "Save". A confirmation form will appear indicating the number of documents that were linked to orders/Jobs.
  6. The documents that were successfully linked will be moved to a directory named “Processed” that will be created within the import directory, if not already present. Any documents left behind were either not asked to be linked or were unable to be linked.

Linking documents in web versions

When using the Link Documents function in web versions of DEACOM, via Tools > Link Documents, users will be presented with the Link Document Profiles form. To be able to link a document, users must establish a Name and a Success, Failure, and Source folder directory where the files will live. In addition, a Frequency functionality, similar to one found in System > Maintenance > EDI Imports, is available on this form.

The Link Document History table, available via System > History / Performance (versions 15.03.051 and above) or System > View Link Document History (versions 15.03.032 and below), displays which link document attempts have passed or failed.

If an error is experienced or one or more documents were unable to be linked, use the following to troubleshoot the issue:

  • Print the report to PDF and copy and paste the barcode into a text editor, such as Notepad, to verify the data is correct.
  • Set the scanner, if one is being used, to a different image format, such as TIFF or PNG. Most scanners support these alternative formats rather than PDF.
  • Increase the resolution on the scanner.
  • Adjust field size on the Report Layout.
  • Some controls were updated between versions. Replace the existing controls in the System32 and SYSWOW64 folders with the controls from the DEACOM folder.
  • Ensure the vcredist_2008_32.exe and/or the vcredist_2008_64.exe's are installed.
  • Reinstall the vcredist_2008_32.exe and/or the vcredist_2008_64.exe. Another program may have installed a different version of these.
  • Ensure the files starting with the letters bi, the license file, and the files starting with the letters ez that are in the controls folder are copied to the System32 and SYSWOW64 folders.
  • If WMS is not recognizing the "JOB-" prefix for barcodes, e.g. the scanner reads the Job number as JOB201868756 instead of 201868756, remove the prefix from the barcode text. The prefix is required in versions 15-02-031 and higher, but it should be omitted when using lower versions, as noted in the "Configuration" section above.

FAQ & Diagnostic Tips

Tip: When testing the Link Documents functionality, double check to make sure that a hard return is not coded at the end of the barcode. This will cause the process to fail. The addition of a hard return often times happens when using MS Word to test the process. Using MS Excel to create the barcodes for testing is recommended.